package com.offcn.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/main")
public class IndexController {

    @RequestMapping("/{page}")
    public String forwardPage(@PathVariable("page") String page, Integer uid, Model model){

        model.addAttribute("uid",uid);
        return "main/"+page;
    }

}
